﻿<phone:PhoneApplicationPage
    x:Class="Photonware.RestUI.SL8.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    toolkit:TiltEffect.IsTiltEnabled="True">

    
    <!--<toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:SlideTransition Mode="SlideRightFadeIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:SlideTransition Mode="SlideLeftFadeIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
-->
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid Background="DodgerBlue" Height="125" VerticalAlignment="Top">

        </Grid>
        <!-- 本地化说明:
            若要本地化显示的字符串，请将其值复制到应用程序的非特定语言资源文件(AppResources.resx)
            中的适当命名的键，然后
            将属性的引号之间的硬编码文本值
            替换为其路径指向该字符串名称的绑定子句。

            例如:

                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"

            此绑定指向模板的名为“ApplicationTitle”的字符串资源。

            在“项目属性”选项卡中添加受支持的语言将会为
            每种语言创建一个新的 resx 文件，该文件可以包含 UI 字符串的翻译值
            。这些示例中的绑定将导致在运行时从
            与应用程序的 CurrentUICulture 匹配的 .resx 文件中
            提取属性的值。
         -->

        <!--枢轴控件-->
        <phone:Pivot Title="rest ui" Foreground="White">
            <!--枢轴项一-->
            <phone:PivotItem>
                <phone:PivotItem.Header>
                    <TextBlock Margin="10" FontSize="45" Text="User Case" />
                </phone:PivotItem.Header>
                <!--具有文字环绕的双线列表-->
                <phone:LongListSelector x:Name="userCaseList" Margin="0,-20,-12,0" ItemsSource="{Binding Items}" SelectionChanged="userCaseList_SelectionChanged" Background="White">
                    <phone:LongListSelector.ItemTemplate>
                        <DataTemplate>
                            <Border BorderThickness="0,0,0,1" BorderBrush="LightGray" Background="{x:Null}">
                                <StackPanel Margin="12,10,0,17" toolkit:TiltEffect.SuppressTilt="False">
                                    <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource  PhoneTextTitle3Style}" Foreground="Black" TextTrimming="WordEllipsis"/>
                                    <!--TextBlock Text="{Binding Description}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="Black"/-->
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </phone:LongListSelector.ItemTemplate>
                </phone:LongListSelector>
            </phone:PivotItem>

            <!--枢轴项二-->
            <phone:PivotItem>
                <phone:PivotItem.Header>
                    <TextBlock Margin="10" FontSize="45" Text="Execution Result" />
                </phone:PivotItem.Header>
                <!--无文字环绕的双线列表-->
                <phone:LongListSelector x:Name="executionList" Margin="0,-20,-12,0" ItemsSource="{Binding Items}" Tap="executionList_Tap" Background="White">
                    <phone:LongListSelector.ItemTemplate>
                        <DataTemplate>
                            <Border BorderThickness="0,0,0,1" BorderBrush="LightGray" Background="{x:Null}">
                                <StackPanel Margin="12,10,0,17">
                                    <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource  PhoneTextTitle3Style}" Foreground="Black" TextTrimming="WordEllipsis"/>
                                    <!--TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Margin="12,0,0,0" Style="{StaticResource PhoneTextLargeStyle}"/-->
                                    <TextBlock Text="{Binding Status}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSmallStyle}" Foreground="Gray"/>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </phone:LongListSelector.ItemTemplate>
                </phone:LongListSelector>
            </phone:PivotItem>
        </phone:Pivot>

        <!--取消注释，以显示对齐网格，从而帮助确保
            控件在公用边界上对齐。图像在系统栏中显示时的
            上边距为 -32px。如果隐藏了系统栏，则将此值设为 0
            (或完全删除边距)。

            在发送之前删除此 XAML 和图像本身。-->
        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" IsHitTestVisible="False" />-->
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="newButton" IconUri="/Assets/outline.squares.png" Text="scan barcode" Click="newButton_Click"/>
            <!--shell:ApplicationBarIconButton x:Name="urlButton" IconUri="/Assets/linkto.png" Text="url"/-->
            <shell:ApplicationBarIconButton x:Name="refreshButton" IconUri="/Assets/Refresh.png" Text="refresh"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="settingsButton" Text="settings" Click="settingsButton_Click" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>